/*  mudmap - A tool to create and organize user side maps for MUD games
 *  Copyright (C) 2012  Neop (aka moemneop, email: mneop@web.de)
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 *  for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, see <http://www.gnu.org/licenses/>.
 */

/*  File description
 *
 *  A toolkit for reading files
 */

#pragma once

#include <cstring>
#include <sstream>
#include <fstream>
#include <vector>
#include <iostream>

using std::string;
using std::cerr;
using std::vector;
using std::ifstream;
using std::stringstream;
using std::endl;

const unsigned readfile_line_length = 1024;

/// liest eine Textdatei in einen string ein
string readfile(string filename);
/** liest eine Textdatei in einen Stringvektor ein
*   \param filename Dateiname
*   \param rs Leerzeichen am Zeilenanfang entfernen wenn true
*/
vector<string> readfile_sv(string filename, bool rs = false);

bool config_comp(string line, string key);
